package com.example.book_recommend.dao;

import com.example.book_recommend.entity.BookInfo;
import com.example.book_recommend.entity.Role;

import java.util.ArrayList;
import java.util.List;

public interface BookInfoMapper {
    int deleteByPrimaryKey(Long bookId);

    int insert(BookInfo record);

    int insertSelective(BookInfo record);

    BookInfo selectByPrimaryKey(Long bookId);

    int updateByPrimaryKeySelective(BookInfo record);

    int updateByPrimaryKey(BookInfo record);

    BookInfo selectByName(String bookname);

    List<BookInfo> getBookByPage(Integer page, Integer size, String name);

    List<BookInfo> getBookByPage0(Integer page, Integer size);

    List<BookInfo> getBookByPage1(Integer page, Integer size, Integer storeId);

    int getPageSizeByStoreId(Integer storeId);

    ArrayList<BookInfo> getCategories();

    List<BookInfo> getBookByPage2(Integer page, Integer size, Integer storeId, Integer isShelf);

    ArrayList<BookInfo> selectByCategory(int id, Integer page,Integer size);

    ArrayList<BookInfo> selectAll();

    ArrayList<BookInfo> selectTop50();

    ArrayList<BookInfo> selectByCategoryWithOrder(int id, int page, int size);
}